# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Balló György <ballogyor+arch at gmail dot com>

pkgname=gnome-usage
pkgver=3.38.1
pkgrel=2
pkgdesc="GNOME application to view information about use of system resources"
url="https://wiki.gnome.org/Apps/Usage"
arch=(x86_64)
license=(GPL3)
depends=(
  gtk3
  libdazzle
  libgtop
  libhandy
  tracker3
  xdg-user-dirs
)
makedepends=(
  accountsservice
  gamemode
  git
  meson
  vala
)
optdepends=(
  'accountsservice: show user tags for processes'
  'gamemode: show processes requesting game mode'
)
_commit=4745bb5e8f2a44a35cb410020dcf6e54e73bd6e1  # tags/3.38.1^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-usage.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
